package com.crazymakercircle.mutithread.basic.create;


import java.util.concurrent.TimeUnit;

public class HookDemo {
    public static void main(String[] args) throws InterruptedException {
        Runtime.getRuntime().addShutdownHook(new Thread(() -> {
            System.out.println("ShutdownHook");
        }, "shutdown"));
        TimeUnit.SECONDS.sleep(1000000);
    }
}
